package subumbo.demo.service {
	import flash.events.Event;
	import flash.net.URLRequestMethod;
	import flash.net.URLVariables;
	
	import org.osflash.signals.Signal;
	
	public class WishService extends AbstractService {
		
		public var result:Signal;
		
		public function WishService() {
			result = new Signal(String);
			request.url = "http://www.subumbo.com/demo/save.php";
		}
		
		public function setWishes(val:String):void {
			var vars:URLVariables = new URLVariables();
			vars.data = val;
			vars.save_show = "true";
			request.data = vars;
			request.method = URLRequestMethod.POST;
		}
		
		protected override function onResult(e:Event):void {
			super.onResult(e);
			result.dispatch(loader.data);
		}
	}
}